﻿using System;

namespace YArchitech.HCLoad.XmlData
{
	public class DataDict
	{
		public DataDict(DataBase dataBase)
		{
			this.parent = dataBase;
			this.AddRoomParams();
			this.AddTimeAssigns();
		}

		public DataBase Parent
		{
			get
			{
				return this.parent;
			}
			set
			{
				this.parent = value;
			}
		}

		public RoomParams RoomParams
		{
			get
			{
				return this.roomParams;
			}
		}

		private void AddRoomParams()
		{
			try
			{
				this.roomParams = new RoomParams(this);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.ToString());
			}
		}

		public TimeAssigns TimeAssigns
		{
			get
			{
				return this.timeAssigns;
			}
		}

		private void AddTimeAssigns()
		{
			try
			{
				this.timeAssigns = new TimeAssigns(this);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.ToString());
			}
		}

		private DataBase parent;

		private RoomParams roomParams;

		private TimeAssigns timeAssigns;
	}
}
